import 'package:flutter/material.dart';

class LaraPressKeepAliveWrapper extends StatefulWidget {
  final Widget page;

  const LaraPressKeepAliveWrapper({super.key, required this.page});

  @override
  State<LaraPressKeepAliveWrapper> createState() =>
      _LaraPressKeepAliveWrapperState();
}

class _LaraPressKeepAliveWrapperState extends State<LaraPressKeepAliveWrapper>
    with AutomaticKeepAliveClientMixin {
  late int value;

  @override
  Widget build(BuildContext context) {
    super.build(context);
    return widget.page;
  }

  void updateValue(int newValue) {
    setState(() {
      value = 1;
    });
  }

  @override
  bool get wantKeepAlive => true;
}
